﻿<%@ Page Title="" Language="C#" MasterPageFile="~/User/User.Master" AutoEventWireup="true"
    CodeBehind="JJCDMX_CC_WL.aspx.cs" Inherits="CoolERP_Web.User.JJCDMX_CC_WL" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="../Scripts/lhgdialog/lhgcore.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        var DG = frameElement.lhgDG;
        //打印预览
        function MyPreview() {
            CreatePrintPage();
            LODOP.PREVIEW();
        }

        //订单的主体和尾部
        function CreatePrintPage() {
            AddTitle();
            //设置主体内容样式
            var strBodyStyle = "<style>table,tr,td,th { border: 1 solid #000000;border-collapse:collapse }</style>";
            var strFormHtml = strBodyStyle + "<table>" + $("#GridView1").html() + "</table>";
            //主体
            LODOP.ADD_PRINT_HTM(195, 20, 716, 512, strFormHtml);
//            LODOP.ADD_PRINT_TABLE(195, 20, 716, 512, "<table align=center border=1 style='text-align:center border-color:Black'>" + $("#GridView1").html() + "</table>");
            LODOP.ADD_PRINT_LINE(190, 14, 190, 725, 0, 1); //第一条线
            LODOP.ADD_PRINT_LINE(1025, 14, 1025, 725, 0, 1); //第二条线
            LODOP.ADD_PRINT_TEXT(1035, 580, 120, 10, "页号：第#页/共&页");
            LODOP.ADD_PRINT_TEXT(1035, 40, 200, 10, "打印时间：" + (new Date()).toLocaleDateString() + " " + (new Date()).toLocaleTimeString());
            //设置纸张大小
            LODOP.SET_PRINT_PAGESIZE(3, 0, 0, "A4");
        };

        //订单的头部
        function AddTitle() {
            LODOP.PRINT_INIT("打印产品仓库进仓单预览");
            LODOP.ADD_PRINT_TEXT(15, 102, 455, 30, "中山市华盛家具制造有限公司  物料仓库进仓单");
            //设置样式，而且只对下面的起作用
            LODOP.SET_PRINT_STYLEA(1, "FontSize", 13);
            LODOP.SET_PRINT_STYLEA(1, "Bold", 1);
            //离顶部距离，离左边距离，长度，高度，内容
            LODOP.ADD_PRINT_TEXT(70, 15, 200, 20, "合同编号：" + $("#ContentPlaceHolder1_liGLDJ").text());
            LODOP.SET_PRINT_STYLEA(2, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(2, "Bold", 1);
            //128A：编码的方式，还有128B、EAN13、EAN128A、Code39等 
            LODOP.ADD_PRINT_BARCODE(55, 450, 100, 50, "128A", $("#ContentPlaceHolder1_liBH").text());
            LODOP.SET_PRINT_STYLEA(3, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(3, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(95, 15, 300, 20, "客户简称：" + $("#ContentPlaceHolder1_liKHJC").text());
            LODOP.SET_PRINT_STYLEA(4, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(4, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(120, 15, 500, 20, "领料部门：" + $("#ContentPlaceHolder1_liBMMC").text());
            LODOP.SET_PRINT_STYLEA(5, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(5, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(145, 15, 500, 20, "出仓原因：" + $("#ContentPlaceHolder1_liReason").text());
            LODOP.SET_PRINT_STYLEA(6, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(6, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(120, 415, 300, 20, "领料人：" + $("#ContentPlaceHolder1_liRYMC").text());
            LODOP.SET_PRINT_STYLEA(7, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(7, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(145, 415, 500, 20, "出仓时间：" + $("#ContentPlaceHolder1_liRQ").text());
            LODOP.SET_PRINT_STYLEA(10, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(10, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(170, 15, 500, 20, "备注：" + $("#ContentPlaceHolder1_liBZ").text());
        };

        //打印维护
        function Setup() {
            CreatePrintPage();
            LODOP.PRINT_SETUP();
        };
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td class="tbHead_L"></td>
            <td class="tbHead_M"><div><b>出仓单编号：<asp:Label ID="liBH" runat="server" /></b></div></td>
            <td class="tbHead_R"></td>
        </tr>
        <tr>
            <td class="tbBody_L"></td>
            <td class="tbBody_M">
                <ul class="tags" style="width: 100%;">
                    <li class="liTitle"><div>详细信息</div></li>
                    <li class="liRight">状态：<asp:Label ID="liZT" runat="server" ForeColor="Red" /></li>
                </ul>
                <table class="grvCSS" cellspacing="0" cellpadding="5" border="1" style="width: 100%;
                    border-collapse: collapse;">
                    <tr>
                        <td style="text-align: right; width: 13%">
                            合同编号:
                        </td>
                        <td style="text-align: left; width: 20%">
                            <asp:Label ID="liGLDJ" runat="server" />
                        </td>
                        <td style="text-align: right; width: 14%">
                            客户简称:
                        </td>
                        <td style="text-align: left; width: 20%">
                            <asp:Label ID="liKHJC" runat="server" />
                        </td>
                        <td style="text-align: right; width: 13%">
                            出仓原因：
                        </td>
                        <td style="text-align: left; width: 20%">
                            <asp:Label ID="liReason" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right">
                            领料部门：
                        </td>
                        <td style="text-align: left">
                            <asp:Label ID="liBMMC" runat="server" />
                        </td>
                        <td style="text-align: right">
                            领料人：
                        </td>
                        <td style="text-align: left">
                            <asp:Label ID="liRYMC" runat="server" />
                        </td>
                        <td style="text-align: right">
                            出仓时间：
                        </td>
                        <td style="text-align: left">
                            <asp:Label ID="liRQ" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right">
                            备注:
                        </td>
                        <td style="text-align: left" colspan="5">
                            <asp:Literal ID="liBZ" runat="server" />
                        </td>
                    </tr>
                </table>
                <ul class="tags" style="width: 100%;">
                    <li class="liTitle"><div>明细列表</div></li>
                </ul>
                <asp:GridView ID="GridView1" runat="server" Width="100%" PageSize="1000" ClientIDMode="Static"
                    CssClass="grvCSS" AutoGenerateColumns="False" AllowPaging="True">
                    <Columns>
                        <asp:TemplateField HeaderText="序号">
                            <ItemTemplate>
                                <%# Container.DataItemIndex + 1 %></ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="物料编号" DataField="BH" />
                        <asp:BoundField HeaderText="物料名称" DataField="MC" />
                        <asp:BoundField HeaderText="物料规格" DataField="GG" />
                        <asp:BoundField HeaderText="颜色" DataField="YS" />
                        <asp:BoundField HeaderText="单位" DataField="DWMC" />
                        <asp:TemplateField HeaderText="出仓数量">
                            <ItemTemplate>
                                <%# Eval("SL").ToString().TrimStart('-') %></ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="仓库" DataField="CKMC" />
                        <asp:BoundField HeaderText="仓位" DataField="CWMC" />
                    </Columns>
                    <PagerSettings Visible="false" />
                </asp:GridView>
                <div style="text-align: center; margin: 10px">
                    <input type="button" value="打印预览" onclick="MyPreview()" class=btn_s />&nbsp;&nbsp;
                    <input type="button" value="打印维护" onclick="Setup()" class=btn_s />&nbsp;&nbsp;
                    <input type="image" src="../Images/Common/btn_close.png" onclick="DG.cancel();" /></div>
            </td>
            <td class="tbBody_R">
            </td>
        </tr>
        <tr>
            <td class="tbFoot_L">
            </td>
            <td class="tbFoot_M">
            </td>
            <td class="tbFoot_R">
            </td>
        </tr>
    </table>
</asp:Content>
